
iplScatter <- ggplot(df, aes(x = ipl24s, y = ipl12s)) +
  geom_abline(intercept = 0, slope = 1, size = 0.5) +
  geom_jitter(size = 0.5, colour = '#8da0cb') +
  geom_smooth(method = lm, se = TRUE, size = 0.7, colour = '#fc8d62') +
  xlab("IPL-24 Integration Index") +
  ylab("IPL-12 Integration Index") +
  coord_cartesian(ylim = c(0, 1), xlim = c(0, 1)) +
  theme_minimal() +
  annotate("text", x = 0.75, y = 0.47, size = 4,
           label = paste("Pearson Cor. = ",
                         round(cor(df$ipl24s, df$ipl12s, use = "complete.obs"), digits = 3),
                         sep = ""))
ggsave(here::here("Draft/PNAS/draft/plots", "iplScatter.pdf"), plot = iplScatter, width = 6, height = 6)
